Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape underscores when converting to latex #1385

Merged
merged 5 commits into from
May 13, 2024
Merged

Escape underscores when converting to latex #1385

merged 5 commits into from
May 13, 2024

Conversation

cqc-alec
Copy link
Collaborator

@cqc-alec cqc-alec commented May 9, 2024

Description

Note that this is the only character we need to worry about, since UnitID names are restricted to "[a-z][A-Za-z0-9_]*".

Related issues

Fixes #1363 .

Checklist

  • I have performed a self-review of my code.
  • I have commented hard-to-understand parts of my code.
  • I have made corresponding changes to the public API documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have updated the changelog with any user-facing changes.

@cqc-alec cqc-alec changed the title Latexfix Escape underscores when converting to latex May 9, 2024
@cqc-alec cqc-alec requested a review from sjdilkes May 9, 2024 13:35
@cqc-alec cqc-alec marked this pull request as ready for review May 9, 2024 13:35
Copy link

github-actions bot commented May 9, 2024

Compiler PytketIBMQ is best, or equal best on, 14.912280701754383% for circuits.

Copy link

Compiler PytketIBMQ is best, or equal best on, 14.912280701754383% for circuits.

@cqc-alec cqc-alec requested review from yao-cqc and removed request for sjdilkes May 13, 2024 08:29
Copy link
Contributor

@yao-cqc yao-cqc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@cqc-alec cqc-alec merged commit 9f2a073 into main May 13, 2024
34 checks passed
@cqc-alec cqc-alec deleted the latexfix branch May 13, 2024 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Circuit.to_latex_file generates invalid LaTeX for register names containing underscores
2 participants